<template>
  <el-avatar class="avatar" :size="size" style="flex-shrink:0" :src="user.avatar">
    <slot>{{ firstChar }}</slot>
  </el-avatar>
</template>

<script>
export default {
  props: ["size", "user"],
  computed: {
    firstChar() {

      return this.user.avatar ?   "": this.user.nickname.charAt(0);
    },
  },
};
</script>

<style>
</style>